package com.ys.controller.api.storage;

import com.ys.config.MenuId;
import com.ys.entity.storage.TccTransportationTypeItem;
import com.ys.service.sys.CommonApiService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * @Author: xjx
 * @CreateTime: 2024-12-05
 * @Description: 运输类型维护子表
 * @Version: 1.5
 */
@Controller
@RequestMapping("/api/inter/tccTransportationTypeItem")
public class ApiInterTccTransportationTypeItemController {
    private static final Logger logger = LoggerFactory.getLogger(ApiInterTccTransportationTypeItemController.class);
    

    @Autowired
    private CommonApiService<TccTransportationTypeItem> commonApiService;

    //菜单id
    private Long menuId = MenuId.TCC_TransportationTypeItem;


    @RequestMapping("/searchItem")
    @ResponseBody
    public TccTransportationTypeItem searchItem(@ModelAttribute TccTransportationTypeItem cond){
        cond.addField("A.TransportationTypeCn transportationTypeCn,A.TransportationTypeEn transportationTypeEn")
                .setOrderby("A.Id DESC");

        cond = commonApiService.dataAuth(menuId, cond);
        return  cond;
    }


}
